#include <stdio.h>
#include <string.h>
#include "hmac-sha256.h"
const unsigned char test_key[32] = 
{0x9e,0xea,0x0c,0xb5,0xfe,0x77,0xc8,0x15,
 0xb9,0xd0,0xd6,0x0e,0x1d,0x81,0x45,0x30,
 0xc4,0xf8,0x91,0xb8,0x79,0xea,0x63,0x57,
 0x5c,0xc4,0x99,0x56,0x1c,0x05,0x3f,0x9d};
#if 0
{0x10,0xaf,0x7e,0x8e,0x17,0xfe,0x3f,0xd1,
 0x5e,0x8f,0xc0,0xaa,0x5c,0x1a,0x1e,0x14,
 0x76,0xa6,0x27,0x74,0x70,0xdc,0x25,0x35,
 0xc6,0xb3,0xbe,0x41,0x68,0x52,0x17,0x3b};
#endif
const unsigned char message[7] =
{0x15, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01};

int main()
{
    int i;
    unsigned char dest[1024] = {0};
    int msg_len;

    msg_len = sizeof(message);
    printf("msg_len: %d.\n", msg_len);
    hmac_sha256(dest, test_key, 32 * 8, message, msg_len * 8);
    for (i = 0; i < 32;  i++) {
        if (i % 16 == 0) {
            printf("\n");
        }
        printf(" %02lx", (unsigned long)dest[i]);
    }
    printf("\n");

    return 0;
}
